package com.haust.alipaydemoserver.listener;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
public class OrderPayListener {
    @PostMapping("/payed/notify")
    public String handleAlipayed(HttpServletRequest request){
        //支付宝调用我们提供的异步通知,返回success,支付宝不再通知
        Map<String, String[]> map = request.getParameterMap();
        System.out.println("支付宝通知:"+map);
        return "success";
    }
}
